import request from '@/utils/request'

export function queryUmsMenuList(id, params) {
    return request({
      url:'webApi/admin/menu/list/'+id,
      method:'get',
      params:params
    })
}

export function treeListUmsMenu() {
    return request({
        url:'webApi/admin/menu/treeList',
        method:'get'
    })
}

export function getUmsMenuById(id) {
    return request({
        url:'webApi/admin/menu/get/'+id,
        method:'get',
    })
}

export function createUmsMenu(data) {
    return request({
        url:'webApi/admin/menu/add',
        method:'post',
        data:data
    })
}

export function updateUmsMenu(id, data) {
    return request({
        url:'webApi/admin/menu/update/' + id,
        method:'post',
        data:data
    })
}

export function deleteUmsMenu(id) {
    return request({
        url:'webApi/admin/menu/delete/' + id,
        method:'delete',
    })   
}